<?php
$month      = date("m");
$year       = date("Y");

$sql_select = "select * from tblnewsletter where iMonth=$month and iYear = $year";
$rs         = $dbsql->query($sql_select);
if( $newsletter = $dbsql->fetch_array($rs) )
{
    
}
else
{
	$sql_insert="insert into tblnewsletter(iMonth,iYear,cTitle,cContent,iStatus) 
                                    values('$month','$year','Newsletter month $month','',0)";
	$dbsql->query($sql_insert);
    
    $newsletter['cTitle']  = 'newsletter month '.$month;
    $newsletter['cContent']= 'getTemplates';        
}
?>